<?php
/**
 * Created by PhpStorm.
 * User: ycqyc
 * Date: 2018/12/10
 * Time: 8:56
 */
function update(){
    $file=fopen('time.txt','r+');
    $t='';
    if(!feof($file)) {
        $t=fgets($file);
        $t=(int)($t);

    }
    fclose($file);
    if($t!=null&&$t!=''){
        echo ($t+60).'------'.time();
        if($t+60<time()){
            $file=fopen('time.txt','w+');
            fwrite($file,time());
            fclose($file);
            return true;
        }else{
            return false;
        }

    }
}